<% layout('/layouts/default.html', {title: '购买活动用户列表', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('购买活动用户列表')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('wx:wxUserDisValueRecord:edit')){ %>
					<!--<a href="${ctx}/wx/wxUserDisValueRecord/form" class="btn btn-default btnTool" title="${text('新增wx_user_dis_value_record')}"><i class="fa fa-plus"></i> ${text('新增')}</a>-->
				<% } %>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${wxUserDisValueRecord}" action="${ctx}/wx/wxUserDisValueRecord/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
			<#form:hidden path="buyActivityId"/>

			<!--<div class="form-group">-->
				<!--<label class="control-label">${text('user_id')}：</label>-->
				<!--<div class="control-inline">-->
					<!--<#form:input path="userId" maxlength="20" class="form-control width-120"/>-->
				<!--</div>-->
			<!--</div>-->
			<div class="form-group">
				<label class="control-label">购买状态：</label>
				<div class="control-inline">
					<select name="buyFlag">
						<option value="1" >购买用户</option>
						<option value="0" >参与用户</option>
						<option value="2" >全部用户</option>
					</select>
				</div>
			</div>
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('user_open_id')}：</label>-->
					<!--<div class="control-inline">-->
						<!--<#form:input path="userOpenId" maxlength="200" class="form-control width-120"/>-->
					<!--</div>-->
				<!--</div>-->
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('buy_user_id')}：</label>-->
					<!--<div class="control-inline">-->
						<!--<#form:input path="buyUserId" maxlength="20" class="form-control width-120"/>-->
					<!--</div>-->
				<!--</div>-->
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('buy_user_open_id')}：</label>-->
					<!--<div class="control-inline">-->
						<!--<#form:input path="buyUserOpenId" maxlength="200" class="form-control width-120"/>-->
					<!--</div>-->
				<!--</div>-->
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('buy_activity_id')}：</label>-->
					<!--<div class="control-inline">-->
						<!--<#form:input path="buyActivityId" maxlength="20" class="form-control width-120"/>-->
					<!--</div>-->
				<!--</div>-->
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('buy_price')}：</label>-->
					<!--<div class="control-inline">-->
						<!--<#form:input path="buyPrice" class="form-control width-120"/>-->
					<!--</div>-->
				<!--</div>-->
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('dis_money_value')}：</label>-->
					<!--<div class="control-inline">-->
						<!--<#form:input path="disMoneyValue" class="form-control width-120"/>-->
					<!--</div>-->
				<!--</div>-->
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('status')}：</label>-->
					<!--<div class="control-inline width-120">-->
						<!--<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>-->
					<!--</div>-->
				<!--</div>-->
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('remarks')}：</label>-->
					<!--<div class="control-inline">-->
						<!--<#form:input path="remarks" maxlength="200" class="form-control width-120"/>-->
					<!--</div>-->
				<!--</div>-->
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		// {header:'${text('')}', name:'nickName'柔软, index:'a.wxUser', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
		// 	return '<a href="${ctx}/wx/wxUserDisValueRecord/form?id='+row.id+'" class="btnList" data-title="${text('编辑wx_user_dis_value_record')}">'+(val||row.id)+'</a>';
		// }},
		{header:'${text('活动标题')}', name:'activityTitle', index:'a.user_open_id', width:150, align:"left"},
		{header:'${text('购买用户')}', name:'nickName', index:'a.nick_name', width:150, align:"center"},
		{header:'${text('真实姓名')}', name:'userName', index:'a.user_name', width:150, align:"center"},
		{header:'${text('用户手机')}', name:'phone', index:'a.phone', width:150, align:"center"},
		{header:'${text('购买价格')}', name:'activityPrice', index:'a.buy_user_open_id', width:150, align:"center"},
		// {header:'${text('buy_activity_id')}', name:'buyActivityId', index:'a.buy_activity_id', width:150, align:"center"},
		// {header:'${text('buy_price')}', name:'buyPrice', index:'a.buy_price', width:150, align:"center"},
		{header:'${text('购买状态')}', name:'buyFlagContent', index:'a.buyFlagContent', width:150, align:"center"},
		{header:'${text('购买时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"}
		// {header:'${text('状态')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
		// 	return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
		// }},
		// {header:'${text('remarks')}', name:'remarks', index:'a.remarks', width:150, align:"left"},
		// {header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
		// 	var actions = [];
		// 	<% if(hasPermi('wx:wxUserDisValueRecord:edit')){ %>
		// 		actions.push('<a href="${ctx}/wx/wxUserDisValueRecord/form?id='+row.id+'" class="btnList" title="${text('编辑wx_user_dis_value_record')}"><i class="fa fa-pencil"></i></a>&nbsp;');
		// 		actions.push('<a href="${ctx}/wx/wxUserDisValueRecord/delete?id='+row.id+'" class="btnList" title="${text('删除wx_user_dis_value_record')}" data-confirm="${text('确认要删除该wx_user_dis_value_record吗？')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
		// 	<% } %>
		// 	return actions.join('');
		// }}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>